{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block title %}用户管理{% endblock %}

{% block page_content %}
<div class="form-inline">
        {{ wtf.quick_form(form) }}
</div>
<br><br>

<table class="table table-bordered">
<tr>
    <th>ID</th>
    <th>邮箱</th>
    <th>姓名</th>
    <th>角色</th>
    <th>注册时间</th>
</tr>
    {% if user_info %}
        {% for i in user_info %}
            <tr>
                <td>{{ i.get('id') }}</td>
                <td>{{ i.get('email') }}</td>
                <td>{{ i.get('name') }}</td>
                <td>{{ i.get('role_name') }}</td>
                <td>{{ i.get('registered_on') }}</td>

                <td>
                    <input type="button" onclick="location.href='/user_manager/modify?email={{ i.get('email') }}&passwd=1'" value="密码重置">
                    </input>

                    <input type="button" onclick="location.href='/user_manager/modify?email={{ i.get('email') }}&is_valid=10'" value="删除">
                    </input>
                </td>

            </tr>
        {% endfor %}
    {% endif %}
</table>
{% endblock %}
